
<#include "/common/head.html"/>

 <div class="easyui-panel updatePage" data-options="fit:true,border:false">
    <form id="ff" class="easyui-form" method="post">
        <table class="table1">
        	
            <tr>
           		<th><span>物料编号：</span></th>
               	<td>
               		<span class="item">${model.mat_no!''}</span>	
           		</td>
           		<th><span>物料名称：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="mat_name" value="${model.mat_name!''}" data-options=""></input>
           		</td>
           		<!-- <th><span>sn码：</span></th>
               	<td>
               		<span class="item">${model.sn_no!''}</span>	
           		</td> -->
           	</tr>
            <tr>	            
           		<th><span>当前库存：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="cur_num" value="${model.cur_num!''}" data-options=""></input>
           		</td>
           		
           		<th><span>计量单位：</span></th>
               	<td>
               		<input id="unit_name" name="unit_name" class="easyui-combobox" value="${model.unit_name!''}" data-options="
               				
               				valueField: 'id',
        					textField: 'text',
        					data:[
        						{id:'', text:''}<#list dictDataunit_name.keySet() as key>,{id:'${key}', text:'${dictDataunit_name.get(key)}'}</#list>
	               			]
               		"/>
           		</td>
           	</tr>
            <tr>
           		<th><span>分类名：</span></th>
               	<td>
               		<input id="cate_name" name="cate_name" class="easyui-combobox" value="${model.cate_name!''}" data-options="
               				
               				valueField: 'id',
        					textField: 'text',
        					data:[
        						{id:'', text:''}<#list dictDatacate_name.keySet() as key>,{id:'${key}', text:'${dictDatacate_name.get(key)}'}</#list>
	               			]
               		"/>
           		</td>
           		
            
           		<th><span>物料规格描述：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="mat_std" value="${model.mat_std!''}" data-options=""></input>
           		</td>
           	</tr>
            <tr>
           		<th><span>是否删除：</span></th>
               	<td>
               		<input id="Is_delete" name="Is_delete" class="easyui-combobox" value="${model.Is_delete!''}" data-options="
               				
               				valueField: 'id',
        					textField: 'text',
        					data:[
        						{id:'', text:''}<#list dictDataIs_delete.keySet() as key>,{id:'${key}', text:'${dictDataIs_delete.get(key)}'}</#list>
	               			]
               		"/>
           		</td>
           		
           		<th><span>创建时间：</span></th>
               	<td>
               		<input class="easyui-datebox" type="text" name="create_time" value="${model.create_time!''}" data-options=""></input>
           		</td>
           		
            </tr>
            <tr>
           		<th><span>创建人：</span></th>
               	<td colspan="4">
               		<span class="item">${model.create_user!''}</span>	
           		</td>           		
            </tr>
        </table>
    </form>
</div>
<script>
top.window.subPage.save = save;
function save() {
	if($("#zcurdHeadTable").form('validate')) {
		$.post("update", getParam(), function(data) {
			top.window.closeWindow();
			top.window.subPage.loadCurrDatagrid();
		});
	}
}
function getParam() {
	var param = {
	     
	    "id": ${model.id}, 
       	    "model.mat_name": getInputValue("mat_name"), 
       	    "model.cur_num": getInputValue("cur_num"), 
       	    "model.unit_name": getInputValue("unit_name"), 
       	    "model.cate_name": getInputValue("cate_name"), 
       	    "model.mat_std": getInputValue("mat_std"), 
       	    "model.Is_delete": getInputValue("Is_delete"), 
       	    "model.create_time": getInputValue("create_time"), 
	}
	for(key in param) {
		if(!param[key]) {
			delete param[key];
		}
	}
	return param;
}

//扩展js
</script>
<#include "/common/foot.html"/>
